The following are from JPEG files showing the paths followed by various charged particles in the same uniform magnetic field.
To create this tool we....
% Calculate the force acting on the particle due to:% the charge of the particle (q), the velocity of the particle (v),% and the uniform magnetic field (B).% Both the velocity and the field are 3D vectors,% and the cross() function is used to find the cross product between the two vector.
F=q*cross(v,B);
%
a=F/m;
%
v=v+dt*a;
The above code...
Traced path of electron moving through a uniform magnetic field
The above image shows the view that the MatLab tool gives...
There were two sources of problems with this approach.
The first problem is that the speed of the particle is changing, which theory tells us is wrong. The problem seems to be that the time steps are too large, causing errors because we are approximating the changing velocity by the constant velocity at the starting point. The results should be improved by using smaller time steps so that the final velocity for each time step will be much closer to the initial velocity for that time step. There are other possible solutions, but they are more complicated to use.
The second problem is that we have ignored the effects of relativity theory. If we take these into account the paths change slightly as the particle's initial speed approaches the speed of light.
These are some images which take into account these porblems.
The last image shows the differences between the final positions when relativistic considerations are made. As one can see, the differences are very minor unless the initial speed of the particle is near the speed of light and a reasonably large number of time steps is involved. This is what we would expect.
This last image allows us to compare both the final position and the final velocity.
The new code is given below
To create this tool we....
The above code...
The above image shows the view that the MatLab tool gives...
Here is the code:
There were two sources of problems with this approach.
The first problem is that the speed of the particle is changing, which theory tells us is wrong. The problem seems to be that the time steps are too large, causing errors because we are approximating the changing velocity by the constant velocity at the starting point. The results should be improved by using smaller time steps so that the final velocity for each time step will be much closer to the initial velocity for that time step. There are other possible solutions, but they are more complicated to use.
The second problem is that we have ignored the effects of relativity theory. If we take these into account the paths change slightly as the particle's initial speed approaches the speed of light.
These are some images which take into account these porblems.
The last image shows the differences between the final positions when relativistic considerations are made. As one can see, the differences are very minor unless the initial speed of the particle is near the speed of light and a reasonably large number of time steps is involved. This is what we would expect.
This last image allows us to compare both the final position and the final velocity.
The new code is given below